/*
 *     This file is part of Neptune Network Emulator.
 *
 *  Neptune Network Emulator is free software: 
 *  you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Neptune Network Emulator is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Neptune Network Emulator.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
/**
 *
 */
package neptune.web.server.operations;

import neptune.manager.allocator.JobQueue;
import it.robertobifulco.ias.IncorrectParamsException;
import it.robertobifulco.ias.Operation;

/**
 * @author Luigi Lorenzo Arpino [luigiarpino@yahoo.it] 
 *
 */
public class RemoveAllFinishedJobs implements Operation 
{
	
	public static String ID = "RemoveAllFinishedJobs";

	/* (non-Javadoc)
	 * @see it.robertobifulco.ias.Operation#execute(java.lang.Object[])
	 */
	public Object[] execute(Object[] args) throws IncorrectParamsException,
			Exception 
	{
		JobQueue.getInstance().removeAllFinishedJobs();
		return new Object[] { new Boolean(true) };
	}

	/* (non-Javadoc)
	 * @see it.robertobifulco.ias.Operation#getDescription()
	 */
	public String getDescription()
	{
		return "Remove all finished jobs from queue";
	}

	/* (non-Javadoc)
	 * @see it.robertobifulco.ias.Operation#getID()
	 */
	public String getID() 
	{
		return ID;
	}

}
